package com.vcc.core.constant;


public enum CardStatusEnum {
    INACTIVE("INACTIVE", "未激活"),
    ACTIVE("ACTIVE", "激活"),
    BLOCKED("BLOCKED", "冻结"),
    CONTROL("CONTROL", "管控"),
    CLOSE("CLOSE", "关卡"),
    ABNORMAL("ABNORMAL", "异常"),
    ;

    private String code;
    private String desc;

    CardStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static CardStatusEnum fromCode(String code) {
        for (CardStatusEnum status : CardStatusEnum.values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return null; // 或者抛出异常
    }

}
